export function useRefModel<T>(
  props: T,
  propName: Exclude<keyof T, Symbol>,
  emit: Function
): any {
  return computed({
    get: () => props[propName],
    set: value => emit(`update:${propName}`, value)
  });
}

import dayjs from "dayjs";
import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
// 扩展 dayjs 使用时区和 utc 插件
dayjs.extend(utc);
dayjs.extend(timezone);
const userTimeZone = dayjs.tz.guess();
export const useDayJs = () => {
  return {
    dayjs,
    timezone,
    utc,
    userTimeZone
  };
};
